//
//  TestComposite.m
//  Charles
//
//  Created by Leo on 2019/7/11.
//  Copyright © 2019 charles. All rights reserved.
//

#import "TestComposite.h"
#import "CompositeObjects.h"

@implementation TestComposite

+ (void)testComposite {
    NSLog(@"Making root entries...");
    
    Directory *rootdir = [[Directory alloc]initWithName:@"root"];
    Directory *bindir = [[Directory alloc]initWithName:@"bin"];
    Directory *tmpdir = [[Directory alloc]initWithName:@"tmp"];
    Directory *usrdir = [[Directory alloc]initWithName:@"usr"];
    
    [rootdir add:bindir];
    [rootdir add:tmpdir];
    [rootdir add:usrdir];
    
    File *vi = [[File alloc]initWithName:@"vi" size:10000];
    [bindir add:vi];
    
    File *latex = [[File alloc]initWithName:@"latex" size:20000];
    [bindir add:latex];
    
    [rootdir printList];

}

@end
